package ru.ifmo.ctd.year2008.notepad.client;

import java.io.IOException;
import java.net.Socket;
import java.util.Arrays;
import java.util.List;

import ru.ifmo.ctd.year2008.notepad.Line;
import ru.ifmo.ctd.year2008.notepad.Text;

/**
 * Fake client for GUI testing.
 * 
 * @author Arina Afanasyeva
 */
public class EmptyClient implements ClientInterface {

	@Override
	public List<String> getDocumentsList() {
		return Arrays.asList("First", "Second", "Third");
	}

	@Override
	public Text openToEdit(String doc) {
		return new Text(Arrays.asList(new Line(0, doc + " document content.")));
	}

	@Override
	public void close() {
		System.out.println("Client closed the connection.");
	}

	@Override
	public Socket connect(String host, int port) {
		System.out.println("Connected");
		return new Socket();
	}

	@Override
	public void sendDiff(List<String> modifiedText) throws IOException {
		System.out.println("Editions are sent.");
	}

	@Override
	public void receiveText() {
		// TODO Auto-generated method stub
		
	}

}
